home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / ghostscript / src / wccommon.mak < prev    next >
Text File  |  1994-08-01  |  3KB  |  145 lines

  1. #    Copyright (C) 1991, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2. #
  3. # This file is part of Ghostscript.
  4. #
  5. # Ghostscript is distributed in the hope that it will be useful, but
  6. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. # to anyone for the consequences of using it or for whether it serves any
  8. # particular purpose or works at all, unless he says so in writing.  Refer
  9. # to the Ghostscript General Public License for full details.
  10. #
  11. # Everyone is granted permission to copy, modify and redistribute
  12. # Ghostscript, but only under the conditions described in the Ghostscript
  13. # General Public License.  A copy of this license is supposed to have been
  14. # given to you along with Ghostscript so you can know your rights and
  15. # responsibilities.  It should be in a file named COPYING.  Among other
  16. # things, the copyright notice and this notice must be preserved on all
  17. # copies.
  18.  
  19. # wccommon.mak
  20. # Section of Watcom C/C++ makefile for Ghostscript common to
  21. # MS-DOS and MS Windows.
  22.  
  23. # This file is used by watc.mak and watcwin.mak.
  24. # Those files supply the following parameters:
  25. #   Configuration, public:
  26. #    GS_LIB_DEFAULT, GS_INIT, FEATURE_DEVS, DEVICE_DEVS*
  27. #   Configuration, internal, generic:
  28. #    PLATFORM, MAKEFILE, AK, CC*, DEBUG, NOPRIVATE
  29. #   Configuration, internal, specific to DOS/Windows:
  30. #    TDEBUG, USE_ASM, ASM,
  31. #    COMPDIR, INCDIR, LIBDIR,
  32. #    CPU_TYPE, FPU_TYPE
  33.  
  34. # We want Unix-compatible behavior.  This is part of it.
  35.  
  36. .NOCHECK
  37.  
  38. # Define additional extensions to keep `make' happy
  39.  
  40. .EXTENSIONS: .be .z
  41.  
  42. # Define the ANSI-to-K&R dependency.  Watcom C accepts ANSI syntax.
  43.  
  44. AK=
  45.  
  46. # Define the extensions for the object and executable files.
  47.  
  48. OBJ=obj
  49. XE=.exe
  50.  
  51. # Define the current directory prefix, shell quote string, and shell name.
  52.  
  53. EXPP=dos4gw
  54. QQ="
  55. SH=
  56. # The following is needed to work around a problem in wmake.
  57. SHP=command /c
  58.  
  59. # Define the generic compilation flags.
  60.  
  61. !ifeq CPU_TYPE 486
  62. FPFLAGS=-fpi87
  63. !else
  64. !ifeq FPU_TYPE 387
  65. FPFLAGS=-fpi87
  66. !else
  67. !ifeq FPU_TYPE 287
  68. FPFLAGS=-fpi287
  69. !else
  70. !ifeq FPU_TYPE -1
  71. FPFLAGS=-fpc
  72. !else
  73. FPFLAGS=-fpi
  74. !endif
  75. !endif
  76. !endif
  77. !endif
  78.  
  79. INTASM=
  80. PCFBASM=
  81.  
  82. # Define the generic compilation rules.
  83.  
  84. .asm.obj:
  85.     $(ASM) $(ASMFLAGS) $<;
  86.  
  87. # Make sure we get the right default target for make.
  88.  
  89. dosdefault: $(GS)$(XE)
  90.     %null
  91.  
  92. # -------------------------- Auxiliary programs --------------------------- #
  93.  
  94. echogs$(XE): echogs.c
  95.     echo OPTION STUB=$(STUB) >_temp_.tr
  96.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) @_temp_.tr echogs.c
  97.  
  98. genarch$(XE): genarch.c
  99.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) genarch.c
  100.  
  101. genconf$(XE): genconf.c
  102.     echo OPTION STUB=$(STUB) >_temp_.tr
  103.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) @_temp_.tr genconf.c
  104.  
  105. # Define the compilation flags.
  106.  
  107. !ifneq NOPRIVATE 0
  108. CP=-dNOPRIVATE
  109. !else
  110. CP=
  111. !endif
  112.  
  113. !ifneq DEBUG 0
  114. CD=-dDEBUG
  115. !else
  116. CD=
  117. !endif
  118.  
  119. !ifneq TDEBUG 0
  120. CT=-d2
  121. LCT=DEBUG ALL
  122. !else
  123. CT=-d1
  124. LCT=DEBUG LINES
  125. !endif
  126.  
  127. !ifneq DEBUG 0
  128. CS=
  129. !else
  130. CS=-s
  131. !endif
  132.  
  133. GENOPT=$(CP) $(CD) $(CT) $(CS)
  134.  
  135. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS)
  136. CC=$(COMP) -oi -i=$(INCDIR) $(CCFLAGS) -zq
  137. CCL=$(CLINK) -p -oi -i=$(INCDIR) -l=dos4g
  138. CCC=$(CC)
  139. CCD=$(CC)
  140. CCCF=$(CC)
  141. CCINT=$(COMP) -oit -i=$(INCDIR) $(CCFLAGS)
  142.  
  143. .c.obj:
  144.     $(CCC) $<
  145.